package com.chinasofti.serializable;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Test01 {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos =
                new ObjectOutputStream(new FileOutputStream("java419\\oos.txt"));
        //创建对象
        Student s = new Student("黄晓明",30);

        oos.writeObject(s);

        oos.close();
    }
}
